package com.tfswx.jkgl.core.sjcc;

import cn.hutool.extra.spring.SpringUtil;

import java.util.Map;

/**
 * @author Smile
 * @date 2021/12/7
 */
public class ScclUtil {
    private static Map<String, ScclBase> map = SpringUtil.getBeansOfType(ScclBase.class);

    public static Object get(String className, Object value) {
        ScclBase sccl = map.get(className);
        if (sccl == null) {
            throw new RuntimeException("未找到对应生成策略");
        }
        return sccl.getValue(value);
    }

    public static Map<String, ScclBase> getScclMap() {
        return map;
    }


}
